//
//  USTarotDetailCell.m
//  us
//
//  Created by karry on 2025/5/14.
//

#import "USTarotDetailCell.h"

@interface USTarotDetailCell()

@end

@implementation USTarotDetailCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.cardImageView.layer.cornerRadius = 8;
    self.cardImageView.layer.masksToBounds = YES;
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.tagView.backgroundColor = UIColor.us_redColor;
    self.tagView.layer.cornerRadius = 2;
    
    USDashedLineView *lineView = [[USDashedLineView alloc]initWithFrame:CGRectMake(0, 0, self.jk_width, 1.2)];
    [self.contentView addSubview:lineView];
    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_offset(20);
        make.right.mas_offset(-20);
        make.bottom.mas_offset(0);
        make.height.mas_equalTo(1.2f);
    }];
    
    

}

- (void)setAnswer:(NSString *)answer{
    
    NSString *text = answer;
    NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
    style.lineSpacing = 6; // 行间距：你可以调整为你想要的值（比如 4~10）
    NSDictionary *attributes = @{
        NSParagraphStyleAttributeName: style
    };
    NSAttributedString *attrText = [[NSAttributedString alloc] initWithString:text attributes:attributes];
    self.answerLab.attributedText = attrText;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}


@end
